package com.zhuang.enums;

public enum CommentTypeEnum {
    QUESTION(1),
    COMMENT(2);

    private Integer code;

    public Integer getCode() {
        return code;
    }

    public static boolean isExist(Integer type) {
        for (CommentTypeEnum value : CommentTypeEnum.values()) {
            if (value.getCode().equals(type)) {
                return true;
            }
        }
        return false;
    }

    CommentTypeEnum(Integer code) {
        this.code = code;
    }
}
